import request from '@/utils/request';

// IP端口

// 根据端id查询组件
export function queryComponentBySegmentId(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/componentIp',
		method: 'post',
		data: data,
	});
}

// 新增组件
export function addComponent(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/componentIp/save',
		method: 'post',
		data: data,
	});
}

// 修改组件
export function editComponent(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/componentIp',
		method: 'put',
		data: data,
	});
}

// 删除
export function batchDeleteComponentByIds(id: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/componentIp/delete/' + id,
		method: 'delete',
	});
}
